package com.ydx.entity;

import java.io.Serializable;
import java.util.Date;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;

/**
 * @TableName patrol
 */
@Data
public class Patrol implements Serializable {
    /**
     *
     */
    @TableId(type = IdType.AUTO)
    private Integer patrolid;

    /**
     *
     */
    private Integer userid;

    /**
     *
     */
    private Integer shiyanshiid;

    /**
     *
     */
    private Date creattime;

    /**
     *
     */
    private String door;

    private String doornotes;


    /**
     *
     */
    private String device;

    private String devicenotes;

    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Patrol other = (Patrol) that;
        return (this.getPatrolid() == null ? other.getPatrolid() == null : this.getPatrolid().equals(other.getPatrolid()))
                && (this.getUserid() == null ? other.getUserid() == null : this.getUserid().equals(other.getUserid()))
                && (this.getShiyanshiid() == null ? other.getShiyanshiid() == null : this.getShiyanshiid().equals(other.getShiyanshiid()))
                && (this.getCreattime() == null ? other.getCreattime() == null : this.getCreattime().equals(other.getCreattime()))
                && (this.getDoor() == null ? other.getDoor() == null : this.getDoor().equals(other.getDoor()))
                && (this.getDevicenotes() == null ? other.getDevicenotes() == null : this.getDevicenotes().equals(other.getDevicenotes()))
                && (this.getDoornotes() == null ? other.getDoornotes() == null : this.getDoornotes().equals(other.getDoornotes()))
                && (this.getDevice() == null ? other.getDevice() == null : this.getDevice().equals(other.getDevice()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getPatrolid() == null) ? 0 : getPatrolid().hashCode());
        result = prime * result + ((getUserid() == null) ? 0 : getUserid().hashCode());
        result = prime * result + ((getShiyanshiid() == null) ? 0 : getShiyanshiid().hashCode());
        result = prime * result + ((getCreattime() == null) ? 0 : getCreattime().hashCode());
        result = prime * result + ((getDoor() == null) ? 0 : getDoor().hashCode());
        result = prime * result + ((getDoornotes() == null) ? 0 : getDoornotes().hashCode());
        result = prime * result + ((getDevicenotes() == null) ? 0 : getDevicenotes().hashCode());
        result = prime * result + ((getDevice() == null) ? 0 : getDevice().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", patrolid=").append(patrolid);
        sb.append(", userid=").append(userid);
        sb.append(", shiyanshiid=").append(shiyanshiid);
        sb.append(", creattime=").append(creattime);
        sb.append(", door=").append(door);
        sb.append(", doornotes=").append(doornotes);
        sb.append(", device=").append(device);
        sb.append(", devicenotes=").append(devicenotes);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}